package com.iot.core.domain;

import com.alibaba.fastjson.JSON;

import java.util.ArrayList;
import java.util.List;

public class OrgTree<T> extends BaseTree<T> {

    private String id;
    /**
     * 节点的子节点
     */
    private List<OrgTree<T>> children = new ArrayList<>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public List<OrgTree<T>> getChildren() {
        return children;
    }

    public void setChildren(List<OrgTree<T>> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
